<template>
	<view class="bg-white rounded-md p-2 mb-2">
		<view class="w-full flex p-2">
			<view class="w-[50%]">
				姓名：{{info.contactName}}
			</view>
			<view>
				联系方式：{{info.contactPhone}}
			</view>
		</view>
		<view class="w-full flex p-2">
			<view class="w-[50%]">
				状态：333
			</view>
			<view>
				邮编：{{info.emsCode}}
			</view>
		</view>
		<view class="w-full  border-dashed border-gray-300 border-b-2 p-2">
			<view>
				{{info.country}} {{info.province}} {{info.city}} {{info.region}} {{info.address}}
			</view>
		</view>
		<view class="w-full flex p-2">
			<view class="w-[50%]">
				附加费：{{info.additionalFee}}
			</view> 
			<view class="w-[50%] flex  flex-row-reverse ">
				<view  @click="del(info.addressId)" class="flex items-center" >
					<uv-icon name="trash"   color="#ff7774" size="22"></uv-icon> 删除
				</view> 
				<view  class="flex items-center  pr-2" @click="edit(info.addressId)">
					<uv-icon name="edit-pen"   color="#ff7774" size="24"></uv-icon> 编辑
				</view>
			</view>
		</view>
	</view>
	
</template>

<script setup>
	const props = defineProps({
		info:{
			type:Object,
			default:{}
		}
	})
	const emit = defineEmits(['del'])
	const del = (id)=>{ 
		emit('del',id)
	}
	const edit = (id)=>{
	uni.navigateTo({
		url: `/pages/admin/address/address_edit/address_edit`,
		success: function(res) {
		res.eventChannel.emit('edit', { addressInfo: props.info})
		}
	})
	}
</script>

<style>

</style>


